package tq.com.tqstudent.bean;

import android.net.Uri;

/**
 * @Author rames
 * @date 2019/3/14 15:47
 */
public class ChatBean {
    public static final int TYPE_OPPOSITE_TEXT = 1; // 对方文本内容
    public static final int TYPE_MINE_IMAGE = 2; // 我方图片内容
    public static final int TYPE_OPPOSITE_IMAGE = 3; // 对方图片
    public static final int TYPE_MINE_TEXT = 4; // 我方文本内容
    public static final int TYPE_OPPOSITE_VIDEO = 5; // 视频播放,暂时只针对于对方

    public int contentType = 0; // 接收到的内容类型
    public static final int CONTENT_TYPE_TEXT = 0; // 接收到的内容类型,文本内容
    public static final int CONTENT_TYPE_IMAGE = 1; // 接收到的内容类型,图片内容
    public static final int CONTENT_TYPE_VIDEO = 2; // 接收到的内容类型,视频内容

    public int type = 1;//item内容 类型

    public String icon;
    public String username;
    public String message;
    public String imageID; // 图片的id
    public Uri imagePath;

    // 以下4个参数主要针对于video
    public int matid;
    public int attid;
    public String title;
    public String videoUrl;

    public ChatBean(int type, int contentType, String icon, String username, String message, String imageID) {
        init(type, contentType, icon, username, message, imageID, null);
    }

    public ChatBean(int type, int contentType, String icon, String username, String message, String imageID, Uri imagePath) {
        init(type, contentType, icon, username, message, imageID, imagePath);
    }

    private void init(int type, int contentType, String icon, String username, String message, String imageID, Uri imagePath){
        this.type = type;
        this.icon = icon;
        this.username = username;
        this.message = message;
        this.imageID = imageID;
        this.imagePath = imagePath;
        this.contentType = contentType;
    }

    public ChatBean(){}
}
